<!doctype html>
<html lang=en>
<head>
<meta charset=utf-8>
<title>\H numbered argument</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.10.1/css/all.min.css" integrity="sha512-9my9Mb2+0YO+I4PUCSwUYO7sEK21Y0STBAiFEYoWtd2VzLEZZ4QARDrZ30hdM1GlioHJ8o8cWQiy8IAb1hy/Hg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<style>@import "dist/ourbigbook.css";

</style>
<link rel="stylesheet" type="text/css" href="main.css">
</head>
<body>
<header>
<a href="/">Ciro Santilli???</a>
<a href=".">Ourbigbook!!!</a>
<a class="font-awesome-container" href="https://github.com/cirosantilli/ourbigbook"><i class="fab fa-github fa-fw"></i></a>
</header>
<main class="ourbigbook">
<div><span class="hide-hover"><a href=".#h-numbered-argument"><span class="fa-solid-900"></span></a></span><div class="h" id="h-numbered-argument"><h1><a href="" title="link to this element"><code>\H</code> <code>numbered</code> argument</a></h1>
<span class="hover-meta"> <span class="sep"></span><a title="view all headers in a single page" href=".#h-numbered-argument"><span class="fa-solid-900"></span> nosplit</a><span class="sep"></span><a href=".#h-arguments" title="parent header"><span class="fa-solid-900"></span> "<code>\H</code> arguments"</a><span class="sep"></span><span class="metrics"><span title="word count for this node + all descendants"><span class="fa-regular-400"></span> words: <span class="word-count-descendant">335</span></span></span></span></div><nav class="h-nav h-nav-toplevel"><div class="nav"> <span title="tags" class="fa-solid-900"></span> tags: <a href=".#boolean-argument" title="internal link
word count: 0
descendant word count: 151
descendant count: 151">Boolean argument</a></div><div class="nav"> <a href=".#h-arguments" title="parent header"><span class="fa-solid-900"></span> "<code>\H</code> arguments"</a><span class="sep"></span><a title="view all headers in a single page" href=".#h-numbered-argument"><span class="fa-solid-900"></span> nosplit</a><span class="sep"></span><a href="#toc"><span class="fa-solid-900"></span> toc</a><span class="sep"></span><span class="metrics"><span title="word count for this node + all descendants"><span class="fa-regular-400"></span> words: <span class="word-count-descendant">335</span></span></span></div></nav>
</div><div><span class="hide-hover"><a href="#_597"><span class="fa-solid-900"></span></a></span><div class="p" id="_597">This <a href=".#boolean-argument" title="internal link
word count: 0
descendant word count: 151
descendant count: 151">boolean argument</a> determines whether renderings of a header will have section numbers or not. This affects all of:<div><ul id="_598">
<li id="_599"><a href=".#header" title="internal link
word count: 53
descendant word count: 5k
descendant count: 64">headers</a> themselves</li>
<li id="_600"><a href=".#table-of-contents" title="internal link
word count: 1
descendant word count: 492
descendant count: 206">table of contents</a> links</li>
<li id="_601"><a href=".#internal-cross-reference" title="internal link
word count: 28
descendant word count: 2k
descendant count: 98">internal cross references</a> with the <a href=".#x-full-argument" title="internal link
word count: 1
descendant word count: 133
descendant count: 83"><code>\x</code> <code>full</code> argument</a>
</li>
</ul></div>This option can be set by default for all files with:</div></div><div><span class="hide-hover"><a href="#_602"><span class="fa-solid-900"></span></a></span><div class="p" id="_602">By default, headers are numbered as in a book, e.g.:
<div class="code" id="_603">
<pre><code>= h1

== h2

=== h3

==== h4
</code></pre></div>
renders something like:
<div class="code" id="_604">
<pre><code>= h1

Table of contents
* 1. h2
  * 1.1. h3
    * 1.1.1. h4

== 1. h2

=== 1.1. h3

==== 1.1.1. h4
</code></pre></div></div></div><div><span class="hide-hover"><a href="#_605"><span class="fa-solid-900"></span></a></span><div class="p" id="_605">However, for documents with a very large number of sections, or <a href=".#unlimited-header-levels" title="internal link
word count: 11
descendant word count: 139
descendant count: 139">deeply nested headers</a> those numbers start to be more noise than anything else, especially in the table of contents and you are better off just referring to IDs. E.g. imagine:
<div class="code" id="_606">
<pre><code>1.3.1.4.5.1345.3.2.1. Some deep level
</code></pre></div></div></div><div><span class="hide-hover"><a href="#_607"><span class="fa-solid-900"></span></a></span><div class="p" id="_607">When documents reach this type of scope, you can disable numbering with the <code>numbered</code> option.</div></div><div><span class="hide-hover"><a href="#_608"><span class="fa-solid-900"></span></a></span><div class="p" id="_608">This option can be set on any header, and it is inherited by all descendants.</div></div><div><span class="hide-hover"><a href="#_609"><span class="fa-solid-900"></span></a></span><div class="p" id="_609">The option only affects descendants.</div></div><div><span class="hide-hover"><a href="#_610"><span class="fa-solid-900"></span></a></span><div class="p" id="_610">E.g., if in the above example turn numbering off at <code>h2</code>:
<div class="code" id="_611">
<pre><code>= h1

== h2
{numbered=0}

=== h3

==== h4
</code></pre></div>
then it renders something like:
<div class="code" id="_612">
<pre><code>= h1

Table of contents
* 1. h2
  * h3
    * h4

== 1. h2

=== h3

==== h4
</code></pre></div></div></div><div><span class="hide-hover"><a href="#_613"><span class="fa-solid-900"></span></a></span><div class="p" id="_613">The more common usage pattern to disable it on toplevel and enable it only for specific "tutorial-like sections". An example can be seen at:<div><ul id="_614">
<li id="_615"><a href="https://cirosantilli.com/">https://cirosantilli.com/</a>: huge toplevel wiki, for which we don't want numbers</li>
<li id="_616"><a href="https://cirosantilli.com/x86-paging">https://cirosantilli.com/x86-paging</a>: a specific tutorial, for which we want numbers
</li>
</ul></div>which is something like:
<div class="code" id="_617">
<pre><code>= Huge toplevel wiki
{numbered=0}

== h2

=== A specific tutorial
{numbered}
{scope}

==== h4

===== h5
</code></pre></div>
then it renders something like:
<div class="code" id="_618">
<pre><code>= Huge toplevel wiki

Table of contents
* h2
  * A specific tutorial
    * 1. h4
      * 1.1.  h5

== h2

=== A specific tutorial

==== 1. h4

===== 1.1. h5
</code></pre></div>
Note how in this case the number for <code>h4</code> is just <code>1.</code> rather than <code>1.1.1.</code>. We only show numberings relative to the first non-numbered header, because the <code>1.1.</code> wouldn't be very meaningful otherwise.</div></div><div><span class="hide-hover"><a href="#toc"><span class="fa-solid-900"></span></a></span></div><div><span class="hide-hover"><a href="#ancestors"><span class="fa-solid-900"></span></a></span><h2 id="#ancestors"><a href="#ancestors">Ancestors</a></h2></div>
<div><ul>
<li><a href=".#h-arguments" title="internal link
word count: 32
descendant word count: 4k
descendant count: 0"><code>\H</code> arguments</a></li>
<li><a href=".#header" title="internal link
word count: 53
descendant word count: 5k
descendant count: 64">Header</a></li>
<li><a href=".#macro" title="internal link
word count: 155
descendant word count: 14k
descendant count: 14">Macro</a></li>
<li><a href="." title="internal link
word count: 296
descendant word count: 32k
descendant count: 234">OurBigBook</a></li>
</ul></div><div><span class="hide-hover"><a href="#incoming-links"><span class="fa-solid-900"></span></a></span><h2 id="incoming-links"><a href="#incoming-links">Incoming links</a></h2></div>
<div><ul>
<li><a href=".#ourbigbook-json/h/numbered" title="internal link
word count: 0
descendant word count: 39
descendant count: 39"><code>numbered</code></a></li>
<li><a href=".#ourbigbook-json/h/splitdefault" title="internal link
word count: 0
descendant word count: 16
descendant count: 16"><code>splitDefault</code></a></li>
</ul></div></main>
<footer>
<div>License: <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a> unless noted</div>
<div>Website source code: <a href="https://github.com/cirosantilli/ourbigbook">https://github.com/cirosantilli/ourbigbook</a></div>
<div>Website Git version: <a href="https://github.com/cirosantilli/ourbigbook/commit/72b4ad0343402d4c826196c7d9bc27ae17c31e1d">72b4ad0343402d4c826196c7d9bc27ae17c31e1d</a></div>
</footer>
<script>
<!-- Google Analytics, AKA selling my soul to Google for some backlinks. -->
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-47867706-1', 'auto');
ga('send', 'pageview');
</script>
<script src="dist/ourbigbook_runtime.js"></script>
<script>ourbigbook_runtime.ourbigbook_runtime()</script>
</body>
</html>
